package com.bs.sc.recommend.job;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import com.bs.sc.recommend.service.RecommendService;

@Component
public class ScheduledTasks {

	@Autowired
	private RecommendService recommendService;

	@Scheduled(fixedRate = 30000)
	public void createUserItemGradeFile() {
		boolean b = recommendService.analyseData();
		System.out.println("定时生成【用户-商品-评分】矩阵文件结果：" + b);
	}

	@Scheduled(fixedRate = 50000)
	public void createUserClassfiyGradeFile() {
		boolean b = recommendService.analyseClassfiyData();
		System.out.println("定时生成【用户-分类-评分】矩阵文件结果：" + b);
	}
}
